<template>
    <el-select v-model="menuVal" placeholder="请选择" @change="change">
        <el-option
        v-for="item in menuList"
        :key="item._id"
        :label="item.Name"
        :value="item._id+''">
        </el-option>
    </el-select>
</template>

<script>
// import {get} from '@/common/app.js'
export default {
    props:{
        value: String
    },
    data() {
        return {
            menuList: [],
            menuVal:'',
        }
    },
    mounted() {
        this.menuVal = this.value
        // this.getMenuData()
    },
    methods: {
        // getMenuData(){
        //     let params = {
        //         method: 'get',
        //     }
        //     get('admin_menu',params).then(res=>{
        //         this.menuList = res.data.data
        //     })
        // },
        change(val){
            this.$emit('change',val)
        },
    },
    components: {},
    watch:{
        value(val){
            this.menuVal = val
        }
    },
}
</script>

<style scoped>

</style>